<?php

require_once 'Cron.php';

$config = new Zend_Config_Xml(realpath(dirname(__FILE__)) . '/../configs/config.xml', null);
Empeval_Config::getInstance($config);

$import = new Empeval_LpImport_EmployeeImport();
$import->start();

EmpevalUsersQuery::create()->filterByExtId(null, Criteria::ISNOTNULL)->filterByDeleted(null, Criteria::ISNULL)->update(array('Deleted' => new DateTime('now')));
foreach (Empeval_Config::getInstance()->ldap->server as $server) {
	if (!(bool)$server->enable)
		continue;
	$import = new Empeval_AdImport_EmployeeImport($server);
	$import->start();
}

require_once dirname(__FILE__) . '/ImportBonusGroups.php';